#define _CRT_SECURE_NO_WARNINGS 1

#include"RBTree.h"
#include<vector>

int main()
{
	//int a[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };
	int a[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	RBTree<int, int> t;
	for (auto e : a)
	{
		t.RBInsert(make_pair(e, e));
		cout << "Insert:" << e << "->" << t.RBIsBalance() << endl;
	}

	//const int N = 1000;
	//vector<int> v;
	//v.reserve(N);
	//srand(time(0));

	//for (size_t i = 0; i < N; i++)
	//{
	//	v.push_back(i);
	//}

	//RBTree<int, int> rbt;
	//for (auto e : v)
	//{
	//	rbt.RBInsert(make_pair(e, e));
	//	cout << "Insert:" << e << "->" << rbt.RBIsBalance() << endl;
	//}
	cout << t.Height() << endl;

	return 0;
}